<?php

if($_POST["simpan"] == "Simpan"){
	$lokasi_file = $_FILES['nama_file']['tmp_name'];
	$nama_file   = $_FILES['nama_file']['name'];
	$tipe_file   = $_FILES['nama_file']['type'];
	$ukuran_file = $_FILES['nama_file']['size'];
	
	
	$nama_baru = preg_replace("/\s+/", "_","_". $nama_file);
	$direktori = "../../file/$nama_baru";
	$MAX_FILE_SIZE = 50000000; //10MB
	move_uploaded_file($lokasi_file, $direktori);
	}
	
?>